package com.serkol.driving.learning.model;

public class SqlModel {
    public static String getCategoryFindId(int id) {
        String sql = "SELECT QUESTION_ID FROM question_bank_assignment t WHERE CATEGORY_ID=" + id;
        return sql;
    }
    //SELECT QUESTION_ID FROM exam_errors

    public static String getQuestionErrorsFindId(long userId) {
        String sql = "SELECT QUESTION_ID FROM exam_errors  WHERE USER_ID=" + userId;
        return sql;
    }

    public static String getQuestionErrorsCountFindId() {
        String sql = "SELECT QUESTION_ID FROM exam_errors as texam_errors WHERE (SELECT COUNT(QUESTION_ID) FROM  exam_errors where QUESTION_ID=texam_errors.QUESTION_ID)>=3 GROUP BY QUESTION_ID ORDER BY COUNT(QUESTION_ID) DESC";
        return  sql;
    }
}
